# coding: utf-8
from application import db
from common.models.user import User


class ResignTalk(db.Model):
    __tablename__ = 'resign_talk'

    id = db.Column(db.Integer, primary_key=True)
    userid = db.Column(db.Integer,db.ForeignKey('user.id'))
    hrid = db.Column(db.Integer,db.ForeignKey('user.id'))
    date = db.Column(db.Date)
    reason = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'))
    improve = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'))
    isreserve= db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    q1 = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'))
    q2 = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'))
    q3 = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'))
    q4 = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'))
    q5 = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'))
    q6 = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'))
    hrcomment=db.Column(db.String(255, 'utf8mb4_0900_ai_ci'))
    hrimprove=db.Column(db.String(255, 'utf8mb4_0900_ai_ci'))

    userinfo = db.relationship('User', foreign_keys=userid)
    hrinfo=db.relationship('User', foreign_keys=hrid)



